#include "ToolDockWidget.h"
#include "FileLayout.h"
#include "ViewLayout.h"
#include "AnalysisLayout.h"
#include "AnimationLayout.h"
#include "ObjectLayout.h"


ToolDockWidget::ToolDockWidget()//:
    //QWidget(parent)
{
    this->setFeatures(QDockWidget::NoDockWidgetFeatures);

   // this->setMinimumWidth(10000);
    this->setMinimumHeight(100);

    //this->setMaximumWidth(10000);
    this->setMaximumHeight(300);
    this->setFeatures(QDockWidget::NoDockWidgetFeatures);
    this->setTitleBarWidget(new QWidget);
    //this->titleBarWidget()->deleteLater();

    this->init_layout();
\
}



ToolDockWidget::~ToolDockWidget()
{

}



void
ToolDockWidget::init_layout ()
{
    QWidget* widget = new QWidget;

    //widget->setStyleSheet("QWidget#widgetMain{border: 10px solid #FF00FF; border-radius: 5px;}");

    QHBoxLayout* common_layout = new QHBoxLayout(widget);

    QGridLayout* file_layout = new FileLayout (common_layout);
    QGridLayout* obje_layout = new ObjectLayout (common_layout);
    QVBoxLayout* view_layout = new ViewLayout (common_layout);
    QGridLayout* ansy_layout = new AnalysisLayout (common_layout);
    QHBoxLayout* anim_layout = new AnimationLayout (common_layout);

    common_layout->addSpacing(0);

    //common_layout->setStretchFactor(file_layout,1);
    //common_layout->setStretchFactor(view_layout,1);
    //common_layout->setStretchFactor(ansy_layout,1);
    //common_layout->setStretchFactor(anim_layout,1);
    common_layout->addStretch();

    this->setWidget(widget);

}
